package com.ssww.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.ssww.dao.ActivityDao;
import com.ssww.entity.Activity;
import com.ssww.service.ActivityService;
/**
 * 
 * @author 
 *
 */
@Service
public class ActivityServiceImpl implements  ActivityService {
	@Resource
	private ActivityDao activityDao;
	
	@Transactional
	public Activity getActivityById(Integer id) {
		return activityDao.getActivityById(id);
	}
	@Transactional
	public List<Activity> getActivityList() {
		return activityDao.getActivityList();
	}
	@Transactional
	public int addActivity(Activity a) {
		activityDao.addActivity(a);
		return 0;
	}
	@Transactional
	public int deleteActivity(int id) {
		activityDao.deleteActivity(id);
		return 0;
	}
	@Transactional
	public int updateActivity(Activity a, int id) {
		activityDao.updateActivity(a, id);
		return 0;
	}


}
